﻿//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro v5.9.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on: 
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using LLBLGenPro.OrmCookbook.FactoryClasses;
using LLBLGenPro.OrmCookbook.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace LLBLGenPro.OrmCookbook.HelperClasses
{
	/// <summary>Singleton implementation of the ModelInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.</summary>
	public static class ModelInfoProviderSingleton
	{
		private static readonly IModelInfoProvider _providerInstance = new ModelInfoProviderCore();

		/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
		static ModelInfoProviderSingleton()	{ }

		/// <summary>Gets the singleton instance of the ModelInfoProviderCore</summary>
		/// <returns>Instance of the FieldInfoProvider.</returns>
		public static IModelInfoProvider GetInstance()
		{
			return _providerInstance;
		}
	}

	/// <summary>Actual implementation of the ModelInfoProvider.</summary>
	internal class ModelInfoProviderCore : ModelInfoProviderBase
	{
		/// <summary>Initializes a new instance of the <see cref="ModelInfoProviderCore"/> class.</summary>
		internal ModelInfoProviderCore()
		{
			Init();
		}

		/// <summary>Method which initializes the internal datastores.</summary>
		private void Init()
		{
			this.InitClass();
			InitDepartmentEntityInfo();
			InitDivisionEntityInfo();
			InitEmployeeEntityInfo();
			InitEmployeeClassificationEntityInfo();
			InitEmployeeDetailEntityInfo();
			InitProductEntityInfo();
			InitProductLineEntityInfo();
			InitCountEmployeesByClassificationResultTypedViewInfo();
			InitCreateEmployeeClassificationResultTypedViewInfo();
			InitDepartmentDetailTypedViewInfo();
			InitGetEmployeeClassificationsResultTypedViewInfo();
			this.BuildInternalStructures();
		}

		/// <summary>Inits DepartmentEntity's info objects</summary>
		private void InitDepartmentEntityInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(DepartmentFieldIndex), "DepartmentEntity");
			this.AddElementFieldInfo("DepartmentEntity", "CreatedByEmployeeKey", typeof(Nullable<System.Int32>), false, true, false, true,  (int)DepartmentFieldIndex.CreatedByEmployeeKey, 0, 0, 10);
			this.AddElementFieldInfo("DepartmentEntity", "CreatedDate", typeof(Nullable<System.DateTime>), false, false, false, true,  (int)DepartmentFieldIndex.CreatedDate, 0, 0, 0);
			this.AddElementFieldInfo("DepartmentEntity", "DepartmentKey", typeof(System.Int32), true, false, true, false,  (int)DepartmentFieldIndex.DepartmentKey, 0, 0, 10);
			this.AddElementFieldInfo("DepartmentEntity", "DepartmentName", typeof(System.String), false, false, false, false,  (int)DepartmentFieldIndex.DepartmentName, 30, 0, 0);
			this.AddElementFieldInfo("DepartmentEntity", "DivisionKey", typeof(System.Int32), false, true, false, false,  (int)DepartmentFieldIndex.DivisionKey, 0, 0, 10);
			this.AddElementFieldInfo("DepartmentEntity", "ModifiedByEmployeeKey", typeof(Nullable<System.Int32>), false, true, false, true,  (int)DepartmentFieldIndex.ModifiedByEmployeeKey, 0, 0, 10);
			this.AddElementFieldInfo("DepartmentEntity", "ModifiedDate", typeof(Nullable<System.DateTime>), false, false, false, true,  (int)DepartmentFieldIndex.ModifiedDate, 0, 0, 0);
		}

		/// <summary>Inits DivisionEntity's info objects</summary>
		private void InitDivisionEntityInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(DivisionFieldIndex), "DivisionEntity");
			this.AddElementFieldInfo("DivisionEntity", "CreatedByEmployeeKey", typeof(System.Int32), false, true, false, false,  (int)DivisionFieldIndex.CreatedByEmployeeKey, 0, 0, 10);
			this.AddElementFieldInfo("DivisionEntity", "CreatedDate", typeof(System.DateTime), false, false, false, false,  (int)DivisionFieldIndex.CreatedDate, 0, 0, 7);
			this.AddElementFieldInfo("DivisionEntity", "DivisionId", typeof(System.Guid), false, false, false, false,  (int)DivisionFieldIndex.DivisionId, 0, 0, 0);
			this.AddElementFieldInfo("DivisionEntity", "DivisionKey", typeof(System.Int32), true, false, true, false,  (int)DivisionFieldIndex.DivisionKey, 0, 0, 10);
			this.AddElementFieldInfo("DivisionEntity", "DivisionName", typeof(System.String), false, false, false, false,  (int)DivisionFieldIndex.DivisionName, 30, 0, 0);
			this.AddElementFieldInfo("DivisionEntity", "FloorSpaceBudget", typeof(Nullable<System.Single>), false, false, false, true,  (int)DivisionFieldIndex.FloorSpaceBudget, 0, 0, 24);
			this.AddElementFieldInfo("DivisionEntity", "FteBudget", typeof(Nullable<System.Decimal>), false, false, false, true,  (int)DivisionFieldIndex.FteBudget, 0, 1, 5);
			this.AddElementFieldInfo("DivisionEntity", "LastReviewCycle", typeof(Nullable<System.DateTimeOffset>), false, false, false, true,  (int)DivisionFieldIndex.LastReviewCycle, 0, 0, 0);
			this.AddElementFieldInfo("DivisionEntity", "MaxEmployees", typeof(Nullable<System.Int32>), false, false, false, true,  (int)DivisionFieldIndex.MaxEmployees, 0, 0, 10);
			this.AddElementFieldInfo("DivisionEntity", "ModifiedByEmployeeKey", typeof(System.Int32), false, true, false, false,  (int)DivisionFieldIndex.ModifiedByEmployeeKey, 0, 0, 10);
			this.AddElementFieldInfo("DivisionEntity", "ModifiedDate", typeof(System.DateTime), false, false, false, false,  (int)DivisionFieldIndex.ModifiedDate, 0, 0, 7);
			this.AddElementFieldInfo("DivisionEntity", "SalaryBudget", typeof(Nullable<System.Decimal>), false, false, false, true,  (int)DivisionFieldIndex.SalaryBudget, 0, 4, 14);
			this.AddElementFieldInfo("DivisionEntity", "StartTime", typeof(Nullable<System.TimeSpan>), false, false, false, true,  (int)DivisionFieldIndex.StartTime, 0, 0, 0);
			this.AddElementFieldInfo("DivisionEntity", "SuppliesBudget", typeof(Nullable<System.Decimal>), false, false, false, true,  (int)DivisionFieldIndex.SuppliesBudget, 0, 4, 14);
		}

		/// <summary>Inits EmployeeEntity's info objects</summary>
		private void InitEmployeeEntityInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(EmployeeFieldIndex), "EmployeeEntity");
			this.AddElementFieldInfo("EmployeeEntity", "CellPhone", typeof(System.String), false, false, false, true,  (int)EmployeeFieldIndex.CellPhone, 15, 0, 0);
			this.AddElementFieldInfo("EmployeeEntity", "EmployeeClassificationKey", typeof(System.Int32), false, true, false, false,  (int)EmployeeFieldIndex.EmployeeClassificationKey, 0, 0, 10);
			this.AddElementFieldInfo("EmployeeEntity", "EmployeeKey", typeof(System.Int32), true, false, true, false,  (int)EmployeeFieldIndex.EmployeeKey, 0, 0, 10);
			this.AddElementFieldInfo("EmployeeEntity", "FirstName", typeof(System.String), false, false, false, false,  (int)EmployeeFieldIndex.FirstName, 50, 0, 0);
			this.AddElementFieldInfo("EmployeeEntity", "LastName", typeof(System.String), false, false, false, false,  (int)EmployeeFieldIndex.LastName, 50, 0, 0);
			this.AddElementFieldInfo("EmployeeEntity", "MiddleName", typeof(System.String), false, false, false, true,  (int)EmployeeFieldIndex.MiddleName, 50, 0, 0);
			this.AddElementFieldInfo("EmployeeEntity", "OfficePhone", typeof(System.String), false, false, false, true,  (int)EmployeeFieldIndex.OfficePhone, 15, 0, 0);
			this.AddElementFieldInfo("EmployeeEntity", "Title", typeof(System.String), false, false, false, true,  (int)EmployeeFieldIndex.Title, 100, 0, 0);
		}

		/// <summary>Inits EmployeeClassificationEntity's info objects</summary>
		private void InitEmployeeClassificationEntityInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(EmployeeClassificationFieldIndex), "EmployeeClassificationEntity");
			this.AddElementFieldInfo("EmployeeClassificationEntity", "EmployeeClassificationKey", typeof(System.Int32), true, false, true, false,  (int)EmployeeClassificationFieldIndex.EmployeeClassificationKey, 0, 0, 10);
			this.AddElementFieldInfo("EmployeeClassificationEntity", "EmployeeClassificationName", typeof(System.String), false, false, false, false,  (int)EmployeeClassificationFieldIndex.EmployeeClassificationName, 30, 0, 0);
			this.AddElementFieldInfo("EmployeeClassificationEntity", "IsEmployee", typeof(System.Boolean), false, false, false, false,  (int)EmployeeClassificationFieldIndex.IsEmployee, 0, 0, 0);
			this.AddElementFieldInfo("EmployeeClassificationEntity", "IsExempt", typeof(System.Boolean), false, false, false, false,  (int)EmployeeClassificationFieldIndex.IsExempt, 0, 0, 0);
		}

		/// <summary>Inits EmployeeDetailEntity's info objects</summary>
		private void InitEmployeeDetailEntityInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(EmployeeDetailFieldIndex), "EmployeeDetailEntity");
			this.AddElementFieldInfo("EmployeeDetailEntity", "CellPhone", typeof(System.String), false, false, false, true,  (int)EmployeeDetailFieldIndex.CellPhone, 15, 0, 0);
			this.AddElementFieldInfo("EmployeeDetailEntity", "EmployeeClassificationKey", typeof(System.Int32), false, false, false, false,  (int)EmployeeDetailFieldIndex.EmployeeClassificationKey, 0, 0, 10);
			this.AddElementFieldInfo("EmployeeDetailEntity", "EmployeeClassificationName", typeof(System.String), false, false, false, false,  (int)EmployeeDetailFieldIndex.EmployeeClassificationName, 30, 0, 0);
			this.AddElementFieldInfo("EmployeeDetailEntity", "EmployeeKey", typeof(System.Int32), false, false, false, false,  (int)EmployeeDetailFieldIndex.EmployeeKey, 0, 0, 10);
			this.AddElementFieldInfo("EmployeeDetailEntity", "FirstName", typeof(System.String), false, false, false, false,  (int)EmployeeDetailFieldIndex.FirstName, 50, 0, 0);
			this.AddElementFieldInfo("EmployeeDetailEntity", "IsEmployee", typeof(System.Boolean), false, false, false, false,  (int)EmployeeDetailFieldIndex.IsEmployee, 0, 0, 0);
			this.AddElementFieldInfo("EmployeeDetailEntity", "IsExempt", typeof(System.Boolean), false, false, false, false,  (int)EmployeeDetailFieldIndex.IsExempt, 0, 0, 0);
			this.AddElementFieldInfo("EmployeeDetailEntity", "LastName", typeof(System.String), false, false, false, false,  (int)EmployeeDetailFieldIndex.LastName, 50, 0, 0);
			this.AddElementFieldInfo("EmployeeDetailEntity", "MiddleName", typeof(System.String), false, false, false, true,  (int)EmployeeDetailFieldIndex.MiddleName, 50, 0, 0);
			this.AddElementFieldInfo("EmployeeDetailEntity", "OfficePhone", typeof(System.String), false, false, false, true,  (int)EmployeeDetailFieldIndex.OfficePhone, 15, 0, 0);
			this.AddElementFieldInfo("EmployeeDetailEntity", "Title", typeof(System.String), false, false, false, true,  (int)EmployeeDetailFieldIndex.Title, 100, 0, 0);
		}

		/// <summary>Inits ProductEntity's info objects</summary>
		private void InitProductEntityInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(ProductFieldIndex), "ProductEntity");
			this.AddElementFieldInfo("ProductEntity", "ProductKey", typeof(System.Int32), true, false, true, false,  (int)ProductFieldIndex.ProductKey, 0, 0, 10);
			this.AddElementFieldInfo("ProductEntity", "ProductLineKey", typeof(System.Int32), false, true, false, false,  (int)ProductFieldIndex.ProductLineKey, 0, 0, 10);
			this.AddElementFieldInfo("ProductEntity", "ProductName", typeof(System.String), false, false, false, false,  (int)ProductFieldIndex.ProductName, 50, 0, 0);
			this.AddElementFieldInfo("ProductEntity", "ProductWeight", typeof(Nullable<System.Decimal>), false, false, false, true,  (int)ProductFieldIndex.ProductWeight, 0, 4, 10);
			this.AddElementFieldInfo("ProductEntity", "ShippingWeight", typeof(Nullable<System.Decimal>), false, false, false, true,  (int)ProductFieldIndex.ShippingWeight, 0, 4, 10);
		}

		/// <summary>Inits ProductLineEntity's info objects</summary>
		private void InitProductLineEntityInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(ProductLineFieldIndex), "ProductLineEntity");
			this.AddElementFieldInfo("ProductLineEntity", "ProductLineKey", typeof(System.Int32), true, false, true, false,  (int)ProductLineFieldIndex.ProductLineKey, 0, 0, 10);
			this.AddElementFieldInfo("ProductLineEntity", "ProductLineName", typeof(System.String), false, false, false, false,  (int)ProductLineFieldIndex.ProductLineName, 50, 0, 0);
		}

		/// <summary>Inits CountEmployeesByClassificationResultView's info objects</summary>
		private void InitCountEmployeesByClassificationResultTypedViewInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(CountEmployeesByClassificationResultFieldIndex), "CountEmployeesByClassificationResultTypedView");
			this.AddElementFieldInfo("CountEmployeesByClassificationResultTypedView", "EmployeeCount", typeof(System.Int32), false, false, true, false, (int)CountEmployeesByClassificationResultFieldIndex.EmployeeCount, 0, 0, 10);
			this.AddElementFieldInfo("CountEmployeesByClassificationResultTypedView", "EmployeeClassificationKey", typeof(System.Int32), false, false, true, false, (int)CountEmployeesByClassificationResultFieldIndex.EmployeeClassificationKey, 0, 0, 10);
			this.AddElementFieldInfo("CountEmployeesByClassificationResultTypedView", "EmployeeClassificationName", typeof(System.String), false, false, true, false, (int)CountEmployeesByClassificationResultFieldIndex.EmployeeClassificationName, 30, 0, 0);
		}

		/// <summary>Inits CreateEmployeeClassificationResultView's info objects</summary>
		private void InitCreateEmployeeClassificationResultTypedViewInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(CreateEmployeeClassificationResultFieldIndex), "CreateEmployeeClassificationResultTypedView");
			this.AddElementFieldInfo("CreateEmployeeClassificationResultTypedView", "EmployeeClassificationKey", typeof(Nullable<System.Int32>), false, false, true, false, (int)CreateEmployeeClassificationResultFieldIndex.EmployeeClassificationKey, 0, 0, 10);
		}

		/// <summary>Inits DepartmentDetailView's info objects</summary>
		private void InitDepartmentDetailTypedViewInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(DepartmentDetailFieldIndex), "DepartmentDetailTypedView");
			this.AddElementFieldInfo("DepartmentDetailTypedView", "DepartmentKey", typeof(System.Int32), false, false, true, false, (int)DepartmentDetailFieldIndex.DepartmentKey, 0, 0, 10);
			this.AddElementFieldInfo("DepartmentDetailTypedView", "DepartmentName", typeof(System.String), false, false, true, false, (int)DepartmentDetailFieldIndex.DepartmentName, 30, 0, 0);
			this.AddElementFieldInfo("DepartmentDetailTypedView", "DivisionKey", typeof(System.Int32), false, false, true, false, (int)DepartmentDetailFieldIndex.DivisionKey, 0, 0, 10);
			this.AddElementFieldInfo("DepartmentDetailTypedView", "DivisionName", typeof(System.String), false, false, true, false, (int)DepartmentDetailFieldIndex.DivisionName, 30, 0, 0);
		}

		/// <summary>Inits GetEmployeeClassificationsResultView's info objects</summary>
		private void InitGetEmployeeClassificationsResultTypedViewInfo()
		{
			this.AddFieldIndexEnumForElementName(typeof(GetEmployeeClassificationsResultFieldIndex), "GetEmployeeClassificationsResultTypedView");
			this.AddElementFieldInfo("GetEmployeeClassificationsResultTypedView", "EmployeeClassificationKey", typeof(System.Int32), false, false, true, false, (int)GetEmployeeClassificationsResultFieldIndex.EmployeeClassificationKey, 0, 0, 10);
			this.AddElementFieldInfo("GetEmployeeClassificationsResultTypedView", "EmployeeClassificationName", typeof(System.String), false, false, true, false, (int)GetEmployeeClassificationsResultFieldIndex.EmployeeClassificationName, 30, 0, 0);
			this.AddElementFieldInfo("GetEmployeeClassificationsResultTypedView", "IsExempt", typeof(System.Boolean), false, false, true, false, (int)GetEmployeeClassificationsResultFieldIndex.IsExempt, 0, 0, 0);
			this.AddElementFieldInfo("GetEmployeeClassificationsResultTypedView", "IsEmployee", typeof(System.Boolean), false, false, true, false, (int)GetEmployeeClassificationsResultFieldIndex.IsEmployee, 0, 0, 0);
		}
	}
}